<?php
$oSysVar = new SysVar();
$sysvar_list = $oSysVar->get_all('*', array('system' => 1, 'isdel' => 0), null);
$sysvars = array();
foreach($sysvar_list['list'] as $item){
	if($item['type'] == 1){
		$item['value'] = unserialize($item['value']);
	}
	$sysvars[$item['id']] = $item;
}

// 热门搜索
$sysvars['search_hot_keyword'] = implode("\n", $sysvars[8]['value']);
// 邮箱设置
$sysvars['email'] = $sysvars[6]['value'];
// UCenter桥接设置
$sysvars['ucenter'] = $sysvars[7]['value'];

$vars['sysvar'] = $sysvars;

/*******************************************************************************
 * 后台设置
 *******************************************************************************/

$oAdmin = new Admin();
$info = $oAdmin->get_row($__s_manager_self['id'], 0, '*');

if(!empty($info)){
	$_style_arr = array();
	foreach($__f_styles as $style){
		$_style_arr[$style['_style']] = $style['_title'];
	}
	
	$_language_arr = array();
	foreach($__f_langs['lang_mark_list'] as $language){
		$_language_arr[$language['mark']] = $language['name'];
	}
	$setting = unserialize($info['setting']);
	if(empty($setting)){
		$setting = array(
			'style'		=> 'default',
			'language'	=> 'zh-cn',
			'debug_pr'	=> 0,
			'debug_fb'	=> 0,
		);
	}

	$info['styles']		= make_radio_group('style', $_style_arr, $setting['style']);
	$info['languages']	= make_radio_group('language', $_language_arr, $setting['language']);
	$info['setting']	= $setting;
	$vars['info']		= $info;
}

?>
